<template>
    <el-breadcrumb>
        <el-breadcrumb-item :to="{ path: 'home' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>学校信息</el-breadcrumb-item>
    </el-breadcrumb>
     <div class="info">
            <el-descriptions title="学校信息"   border align="center">
                <el-descriptions-item :rowspan="2"  :width="140" label="学校图标" align="center">
                    <el-image style="width: 100px; height: 100px"
                        src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png" />
                </el-descriptions-item>
                <el-descriptions-item  label="学校编号"  align="center">{{schoolinfos.schoolid}}</el-descriptions-item>
                <el-descriptions-item  label="名称"  align="center">{{schoolinfos.name}}</el-descriptions-item>
                <el-descriptions-item  label="类型"  align="center">{{schoolinfos.type}}</el-descriptions-item>
                <el-descriptions-item  label="官网"  align="center">{{schoolinfos.website}}</el-descriptions-item>
                <el-descriptions-item  label="校训"  align="center">{{schoolinfos.motto}}</el-descriptions-item>
                 <el-descriptions-item  align="center"   label="位置">
                    {{schoolinfos.postion}}
                </el-descriptions-item>
                <el-descriptions-item  align="center"  span="3"  label="荣誉">
                    <p v-for="(item,i) in honor" :key="i">
                        {{ item.honor }}{{ item.create_time }}
                    </p>
                </el-descriptions-item>
                  <el-descriptions-item  align="center"   label="操作">
                    <el-button type="primary" size="small">编辑</el-button>
                </el-descriptions-item>
                
            </el-descriptions>
        </div>
</template>

<script setup lang='ts'>
import { ref, onMounted} from 'vue'
import { schoolinfo } from '@/apis/school'
const schoolinfos=ref<any>({})
const honor = ref<any>([])
const getschool = async()=>{
    const res  =await schoolinfo()
    schoolinfos.value=res.data.school
    honor.value = res.data.honor
}
onMounted(()=>{
    getschool()
})
</script>
<style lang='scss' scoped>
.info {
    margin-top: 15px;
}
</style>